import Vue from 'vue'

const apiUrl = 'api/'

export default {
  getCitys (provinceId) {
    return Vue.http.get(apiUrl + 'province/' + provinceId + '/city')
  },
  saveCity (city) {
    if (!city.pkid) {
      return Vue.http.post(apiUrl + 'city/', city)
    } else {
      return Vue.http.put(apiUrl + 'city/', city)
    }
  }
}
